result=1

times=7830457

while times>0:
    result*=2
    if len(str(result))>10:
        result=int(str(result)[-10:])
    if times%1000==0:
        print times
    times-=1

result=result*28433
result+=1
print str(result)[-10:]
